package com.qys.livesMall.app.user.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2023-06-06
 */
@Getter
@Setter
@TableName("h2_app_user_level")
@Schema(name = "AppUserLevel")
public class AppUserLevel implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    @Schema(description = "等级名")
    private String name;

    @Schema(description = "等级图标")
    private String icon;

    @Schema(description = "邀请直系人数")
    private Integer upgradeConditionNum;

    @Schema(description = "保持金额")
    private BigDecimal keepAmount;

    @Schema(description = "创建者")
    @JsonIgnore
    private String createBy;

    @Schema(description = "创建时间")
    @JsonIgnore
    private LocalDateTime createTime;

    @Schema(description = "更新者")
    @JsonIgnore
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonIgnore
    private LocalDateTime updateTime;

    @Schema(description = "等级")
    private Integer level;

    @Schema(description = "父级Id")
    @TableField(value = "parent_level", updateStrategy = FieldStrategy.IGNORED)
    private Integer parentLevel;

    @Schema(description = "是否允许上传短视频  1:允许  2：不允许")
    @TableField("up_short_video_flag")
    private Byte upShortVideoFlag;

    @Schema(description = "是否允许开店  1:允许  2：不允许")
    @TableField("open_shop_flag")
    private Byte openShopFlag;

    @Schema(description = "是否允许线上理财 1:允许  2：不允许")
    @TableField("online_financial_flag")
    private Byte onlineFinancialFlag;

    @Schema(description = "是否允许线下理财 1:允许  2：不允许")
    @TableField("offline_financial_flag")
    private Byte offlineFinancialFlag;

    @Schema(description = "申请主播 1:允许  2：不允许")
    @TableField("apply_anchor")
    private Byte applyAnchor;

    @Schema(description = "发起任务 1:允许  2：不允许")
    @TableField("initiate_task")
    private Byte initiateTask;

    @Schema(description = "最小提现")
    private BigDecimal minimumWithdrawal;

    @Schema(description = "最大提现")
    private BigDecimal maximumWithdrawal;

    @Schema(description = "日提现次数")
    private Integer dailyWithdrawal;

    @Schema(description = "周提现次数")
    private Integer weeklyWithdrawal;

    @Schema(description = "奖励")
    private String reward;

    @Schema(description = "邀请非直系人数")
    private Integer inviteNonDirect;

    @Schema(description = "充值金额")
    private BigDecimal rechargeAmount;

    @Schema(description = "邀请人数有效充值金额")
    private BigDecimal effectiveRechargeAmount;
}
